package com.xuecheng.api.swagger.controller;

import com.xuecheng.api.swagger.env.entity.Student;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Api(tags = "HelloApi服务测试",description = "对HelloApi服务提供接口")
public interface HelloApi {
    @ApiOperation("测试Hello方法")
    String hello();

    @ApiOperation("测试queryString方法")
    @ApiImplicitParam(name="num",value = "学生编号",required = true,dataType = "String",paramType = "query")
    public Student modifyStudentNum(@RequestParam("num") String num);

    @ApiOperation("综合参数方式的测试方法")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "学成的编号", required = true, dataType = "String", paramType = "path"),
            @ApiImplicitParam(name = "name", value = "学成的名称", required = true, dataType = "String", paramType = "query")
    })
    public Student mofidyStudentBynNum(@PathVariable("id") String id, @RequestParam("name") String name, @RequestBody Student student);

}

